package com.google.code.p.restrpc.core.async;

import com.google.code.p.restrpc.AsyncRpcResult;
import com.google.code.p.restrpc.Shutdownable;

/**
 * @author dz
 */
public interface AsyncRpcResultCache extends Shutdownable {
    
    /**
     * @return
     */
    public boolean isStarted();
    
    /**
     * @param id
     * @param asyncRpcResult
     */
    public void put(String id, AsyncRpcResult asyncRpcResult);
    
    /**
     * @param id
     * @param asyncRpcResult
     * @return
     */
    public AsyncRpcResult update(String id, AsyncRpcResult asyncRpcResult);
    
    /**
     * @param id
     * @return
     */
    public AsyncRpcResult get(String id);
    
    /**
     * @param id
     * @return
     */
    public AsyncRpcResult remove(String id);
    
    /**
     * 
     */
    public void clearup();
    
}
